Skip to content

Conversation

anuraaga
Copy link

What does this pull request do?

This wires up the new composite sampler to EDOT.

I followed the same approach as EDOT Java which enables the sampler unconditionally I believe

https://github.com/elastic/elastic-otel-java/blob/1254b84e16c5cf6829f2b84bf63c902b71626448/custom/src/main/java/co/elastic/otel/ElasticAutoConfigurationCustomizerProvider.java#L95

Happy to change to registering a OTEL_TRACES_SAMPLER name instead, presumably the behavior should be consistent between the two though - I can update Java if we change it.

/cc @xrmx @AlexanderWert @jackshirazi

@anuraaga anuraaga requested a review from a team as a code owner October 10, 2025 06:47
logger.debug("Cannot get sampler from tracer provider.")
return ConfigUpdate()

# FIXME: this needs to be updated for the consistent probability samplers
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
# FIXME: this needs to be updated for the consistent probability samplers

Comment on lines -162 to -163
os.environ.setdefault(OTEL_TRACES_SAMPLER, "parentbased_traceidratio")
os.environ.setdefault(OTEL_TRACES_SAMPLER_ARG, str(DEFAULT_SAMPLING_RATE))
Copy link
Member

@xrmx xrmx Oct 10, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

We should also remove these from the documentation. Need to check priority of OTEL_TRACES_SAMPLER env var against the configure parameter. An option is to provide our own entry points and just switch to it there?

@jackshirazi
Copy link

I followed the same approach as EDOT Java which enables the sampler unconditionally I believe

I consider EDOT to provide an opinionated agent. If customers need better configurability, let them feed that back rather than we try an anticipate needs that might not be requested

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants